package com.example.spring.domain;

import lombok.Data;

/**
 * 产品详情实体类
 * @TableName product_details
 */
@Data
public class ProductDetails {
    /**
     * 主键ID
     */
    private Integer id;

    /**
     * 产品型号
     */
    private String productModel;

    /**
     * 控制器序列号
     */
    private String controllerSerialNumber;

    /**
     * 配套产品
     */
    private String accessoryProduct;

    /**
     * 触摸屏序列号
     */
    private String touchscreenSerialNumber;

    /**
     * 购买日期
     */
    private String purchaseDate;

    /**
     * 购买旺旺ID
     */
    private String purchaseWangwangId;

    /**
     * 客户姓名
     */
    private String customerName;

    /**
     * 客户电话
     */
    private String customerPhone;

    /**
     * 客户地址
     */
    private String customerAddress;

    /**
     * 店铺类型
     */
    private String shopType;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 省份
     */
    private String province;

    /**
     * 区域
     */
    private String region;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProductDetails other = (ProductDetails) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getProductModel() == null ? other.getProductModel() == null : this.getProductModel().equals(other.getProductModel()))
            && (this.getControllerSerialNumber() == null ? other.getControllerSerialNumber() == null : this.getControllerSerialNumber().equals(other.getControllerSerialNumber()))
            && (this.getAccessoryProduct() == null ? other.getAccessoryProduct() == null : this.getAccessoryProduct().equals(other.getAccessoryProduct()))
            && (this.getTouchscreenSerialNumber() == null ? other.getTouchscreenSerialNumber() == null : this.getTouchscreenSerialNumber().equals(other.getTouchscreenSerialNumber()))
            && (this.getPurchaseDate() == null ? other.getPurchaseDate() == null : this.getPurchaseDate().equals(other.getPurchaseDate()))
            && (this.getPurchaseWangwangId() == null ? other.getPurchaseWangwangId() == null : this.getPurchaseWangwangId().equals(other.getPurchaseWangwangId()))
            && (this.getCustomerName() == null ? other.getCustomerName() == null : this.getCustomerName().equals(other.getCustomerName()))
            && (this.getCustomerPhone() == null ? other.getCustomerPhone() == null : this.getCustomerPhone().equals(other.getCustomerPhone()))
            && (this.getCustomerAddress() == null ? other.getCustomerAddress() == null : this.getCustomerAddress().equals(other.getCustomerAddress()))
            && (this.getShopType() == null ? other.getShopType() == null : this.getShopType().equals(other.getShopType()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
            && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince()))
            && (this.getRegion() == null ? other.getRegion() == null : this.getRegion().equals(other.getRegion()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getProductModel() == null) ? 0 : getProductModel().hashCode());
        result = prime * result + ((getControllerSerialNumber() == null) ? 0 : getControllerSerialNumber().hashCode());
        result = prime * result + ((getAccessoryProduct() == null) ? 0 : getAccessoryProduct().hashCode());
        result = prime * result + ((getTouchscreenSerialNumber() == null) ? 0 : getTouchscreenSerialNumber().hashCode());
        result = prime * result + ((getPurchaseDate() == null) ? 0 : getPurchaseDate().hashCode());
        result = prime * result + ((getPurchaseWangwangId() == null) ? 0 : getPurchaseWangwangId().hashCode());
        result = prime * result + ((getCustomerName() == null) ? 0 : getCustomerName().hashCode());
        result = prime * result + ((getCustomerPhone() == null) ? 0 : getCustomerPhone().hashCode());
        result = prime * result + ((getCustomerAddress() == null) ? 0 : getCustomerAddress().hashCode());
        result = prime * result + ((getShopType() == null) ? 0 : getShopType().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getProvince() == null) ? 0 : getProvince().hashCode());
        result = prime * result + ((getRegion() == null) ? 0 : getRegion().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", productModel=").append(productModel);
        sb.append(", controllerSerialNumber=").append(controllerSerialNumber);
        sb.append(", accessoryProduct=").append(accessoryProduct);
        sb.append(", touchscreenSerialNumber=").append(touchscreenSerialNumber);
        sb.append(", purchaseDate=").append(purchaseDate);
        sb.append(", purchaseWangwangId=").append(purchaseWangwangId);
        sb.append(", customerName=").append(customerName);
        sb.append(", customerPhone=").append(customerPhone);
        sb.append(", customerAddress=").append(customerAddress);
        sb.append(", shopType=").append(shopType);
        sb.append(", remarks=").append(remarks);
        sb.append(", province=").append(province);
        sb.append(", region=").append(region);
        sb.append("]");
        return sb.toString();
    }
} 